#define _CRT_SECURE_NO_WARNINGS 1

#include "SequenceList.h"

int main()
{
	SL sl;
	SL_Init(&sl);

	SL_PushBack(&sl, 1);
	SL_PushBack(&sl, 2);
	SL_PushBack(&sl, 3);
	SL_PushBack(&sl, 4);
	SL_PushBack(&sl, 5);
	SL_PushBack(&sl, 6);
	SL_Print(&sl);

	SL_PopBack(&sl);
	SL_PopBack(&sl);
	SL_PopBack(&sl);
	SL_Print(&sl);

	SL_PushFront(&sl, 1);
	SL_PushFront(&sl, 2);
	SL_PushFront(&sl, 3);
	SL_PushFront(&sl, 4);
	SL_PushFront(&sl, 5);
	SL_PushFront(&sl, 6);
	SL_Print(&sl);

	SL_PopFront(&sl);
	SL_PopFront(&sl);
	SL_PopFront(&sl);
	SL_Print(&sl);

	int pos = SL_Find(&sl, 4);
	if (pos > 0)
	{
		printf("position is %d\n", pos);
	}
	else
	{
		printf("does not have this number\n");
	}

	SL_Modify_ByNumber(&sl, 3, 9);
	SL_Print(&sl);

	SL_Modify_ByValue(&sl, 9, 25);
	SL_Print(&sl);

	SL_Remove(&sl, 3);
	SL_Print(&sl);

	SL_PushBack(&sl, 1);
	SL_PushBack(&sl, 1);
	SL_PushBack(&sl, 1);
	SL_PushBack(&sl, 2);
	SL_PushBack(&sl, 2);
	SL_PushBack(&sl, 3);
	SL_PushBack(&sl, 4);
	SL_PushBack(&sl, 4);
	SL_PushBack(&sl, 5);
	SL_PushBack(&sl, 5);
	SL_Print(&sl);

	//SL_RemoveDuplicate(&sl);
	//SL_Print(&sl);

	SL_Destroy(&sl);

	return 0;
}